﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BattleShips.Common;
using System.Net.Sockets;

namespace BattleShips.GameClients {
    class CommandBuilder {

        public static Command Login(string user, string pass) {
            return new Command() {
                CommandName = "login",
                Argument = String.Format("{0}-{1}", user, pass)
            };
        }

        public static Command LoginSuccesfull(TcpClient client) {
            return new Command() {
                CommandName = "loginsuccessful"
            };
        }

        public static Command Register(string user, string pass) {
            return new Command() {
                CommandName = "register",
                Argument = String.Format("{0}-{1}", user, pass)
            };
        }

        public static Command RegistrationSuccesfull(TcpClient client) {
            return new Command() {
                CommandName = "registrationsuccessful"
            };
        }

        public static Command CreateRoom(string roomName) {
            return new Command() {
                CommandName = "createroom",
                Argument = roomName
            };
        }

        public static Command SearchForARoom() {
            return new Command() {
                CommandName = "searchroom"
            };
        }

        public static Command Surrender() {
            return new Command() {
                CommandName = "surrender"
            };
        }

        public static Command ExitGame() {
            return new Command() {
                CommandName = "exitgame"
            };
        }

    }
}
